<template>
	<view>
		<movable-area  style="position: fixed;top: 0;left: 0;width: 100%;height: 100%; pointer-events: none;" v-if="isShow">
			<movable-view direction="all" x="540rpx" y="610rpx" style="width: 200rpx; height: 300rpx;pointer-events: auto;position: relative;" @click="ToBack()">
				<!-- #ifdef MP-WEIXIN -->
					<live-player id="player" :src="flv_url" mode="live" autoplay bindstatechange="statechange" binderror="error"  style="width: 100%;height: 100%;" object-fit='fillCrop'>	</live-player>
					<view class="closeWindow" @click.stop="closeWindow()">×</view>
				<!-- #endif -->
			</movable-view>
		</movable-area>
	</view>
</template>

<script>
	export default {
		name: 'MinWindow',
		props: {
			flv_url: {
				type: String,
				default: ""
			}, 
		},
		data() {
			return {
				isShow:true
			}
		},
		methods: {
			ToBack(){
				uni.navigateBack({})
			},
			closeWindow(){
				this.isShow = false
			}
			
		}
	}
</script>

<style>
	.closeWindow{
		width: 30rpx;
		height: 30rpx;
		background-color: #FFFFFF;
		position: absolute;
		top: 10rpx;
		right: 10rpx;
		text-align: center;
		line-height: 30rpx;
		z-index: 99999;
		border-radius: 50%;
	}
</style>
